<?php
/**
 * Created by PhpStorm.
 * 引用传值和普通传值区别
 * User: ywf
 * Date: 2015/6/11
 * Time: 15:19
 */
$a=array(1,2,3,4,5,6,7,8);
var_dump($a);
foreach($a as $k=>$v){
    //$b[]=$v+1;
    $a[$k]=$v+1;
}
var_dump($a);

$c=array(1,2,3,4,5,6,7,8);
foreach($c as &$v){
    $v=$v+1;
    unset($v);
}
var_dump($c);